﻿Public Class AddNumbers
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub bt_DisplaySum_Click(sender As Object, e As EventArgs) Handles bt_DisplaySum.Click
        lb_Sum.Text = SumNumbers(tb_FirstNumber.Text, tb_SecondNumber.Text)
    End Sub

    Function SumNumbers(ByVal num1 As String, ByVal num2 As String) As Double
        Dim number1, number2, result As Double
        number1 = CDbl(tb_FirstNumber.Text)
        number2 = CDbl(tb_SecondNumber.Text)
        result = number1 + number2
        Return result
    End Function
End Class